package com.demon.net

import androidx.lifecycle.MutableLiveData
import com.demon.net.handler.DefaultResponseResultHandler
import com.demon.net.handler.IResponseResultHandler
import com.demon.net.ui.UIState

/**
 * 类简要描述
 * <p/>
 * <p>
 * 类详细描述
 * </p>
 *
 * @author zhaozeyang
 * @date 2020/10/15
 */
interface IRemoteServiceInvoke {
  fun createNetExecutor(): IExecutor
  fun <T : Any> rpcExecute(
      rpcCall: suspend () -> IAppResponse<T>,
      uiState: MutableLiveData<UIState>,
      responseResultHandler: IResponseResultHandler? = DefaultResponseResultHandler(),
      success: ((t: T?) -> Unit)? = null
  )

}